 -----------------------------------------
 -- SCRIPT: main_menu.lua
 -----------------------------------------
function btn_clicked_main_newgame(e)
	local we = CEGUI.toWindowEventArgs(e);
	CEGUI.WindowManager:getSingleton():getWindow("NewGameConfirm"):show()
	CEGUI.WindowManager:getSingleton():getWindow("MainMenu"):hide()
end

function btn_clicked_main_newgameconfirm_ok(e)
	local we = CEGUI.toWindowEventArgs(e);
	CEGUI.WindowManager:getSingleton():getWindow("MainMenu"):show()
	CEGUI.WindowManager:getSingleton():getWindow("NewGameConfirm"):hide()
end	

function btn_clicked_main_newgameconfirm_cancel(e)
	local we = CEGUI.toWindowEventArgs(e);
	CEGUI.WindowManager:getSingleton():getWindow("MainMenu"):show()
	CEGUI.WindowManager:getSingleton():getWindow("NewGameConfirm"):hide()
end
 local logger = CEGUI.Logger:getSingleton()
 logger:logEvent(">>> Init script says hello")
 
local system    = CEGUI.System:getSingleton()
local winmgr    = CEGUI.WindowManager:getSingleton()
local root = winmgr:loadWindowLayout("main.layout")
system:setGUISheet(root)
root:getChild("NewGameConfirm"):hide() 
 
--winmgr:getWindow("Main/NewGame"):subscribeEvent("Clicked", "btn_clicked_main_newgame")
--winmgr:getWindow("Main/NewGameConfirm/Ok"):subscribeEvent("Clicked", "btn_clicked_main_newgameconfirm_ok")
--winmgr:getWindow("Main/NewGameConfirm/Cancel"):subscribeEvent("Clicked", "btn_clicked_main_newgameconfirm_cancel")
